// Copyright (C) 2010 Razvan Constantin <razvan.constantin@rconst.net>
//
// This file is part of FileBow.
//
// FileBow is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// FileBow is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with FileBow.  If not, see <http://www.gnu.org/licenses/>.

// Declaration for Plugin class.

#ifndef FILEBOW_UI_PLUGIN_H__
#define FILEBOW_UI_PLUGIN_H__

#include <memory> // For auto_ptr.

#include <gtk/gtk.h>  // For GtkWidget.

#include "logic/navigator.h"

namespace filebow {

class Plugin {

  /**
   * Constructor.
   */
  public: Plugin();

  /**
   * Destructor.
   */
  public: ~Plugin();

  /**
   * Installs plugin menu items.
   */
  public: void SetupMenu();

  /**
   * Installs plugin signal handlers.
   */
  public: void SetupHandlers();

  /**
   * Install plugin keyboard bindings.
   */
  public: void SetupKeys();

  /**
   * Loads the project directory into the file navigator.
   */
  public: void LoadProject();

  public: void HandleOpen(const std::string& file);
  public: void HandleActivate(const std::string& file);
  public: void HandleClose(const std::string& file);

  /**
   * Shows navigate dialog.
   */
  public: void ShowNavigateDlg();

  /** Path tree. */
  private: std::auto_ptr<Navigator> mNavigator;

  /** Navigate menu. */
  private: GtkWidget* mNavigateMenu;
};

} // namespace filebow

#endif // FILEBOW_UI_PLUGIN_H__
